<?php

final class _message {

	private $message = '';
	private $class 	 = 'exitos';
	private $width 	 = '100%';

	public function __construct($message = '',$class = ''){
		
		if(!is_string($message)) return "";
		
		$this->message = $message;

		$this->class = $class;

	}
	
	public function set_width($width='100%'){
		$this->width = $width;
	}
	
	public function get_width(){
		return $this->width;
	}

	public function set_message($message='',$class='exitos'){

		if(!is_string($message)) return;

		$this->message = $message;

		$this->class = $class;

	}

	public function get_message(){

		if($this->message != ''){
			
			switch ($this->class) {
				case 'exitos':
						$message = "<center>
										<div class='message_succes' style='width:".$this->get_width().";'>
										<div class='message_succes_icon'>&nbsp;</div>
										<div class='message_text_succes'>
											<!--<strong>Exito!</strong>--> $this->message
										</div>
										</div>
									</center>";
					break;
				case 'errores':
						$message = "<center>
										<div class='message_error' style='width:".$this->get_width().";'>
										<div class='message_error_icon'>&nbsp;</div>
										<div class='message_text_error'>
											<!--<strong> Error! </strong>--> $this->message
										</div>
										</div>
									</center>";
					break;			
				default:
					break;
			}

			//return "<center><div id='div_message_operation' style='width:".$this->get_width().";text-align:left;'><ul class='{$this->class}'> {$this->message }</ul></div></center>";
			return $message;
		}else{

			return "<div id='div_message_operation'>&nbsp;</div>";

		}

	}

	public function get_text_message(){ return $this->message; }

}


?>